using UnityEngine;

public class HoleCore : MonoBehaviour
{
	private void OnTriggerStay(Collider other)
	{
		if (!other.CompareTag("PipeCore"))
		{
			return;
		}
		Hole componentInParent = GetComponentInParent<Hole>();
		Hole componentInParent2 = other.GetComponentInParent<Hole>();
		if (!(componentInParent == null) && !(componentInParent2 == null) && !componentInParent.IsDead && !componentInParent2.IsDead && componentInParent.Size > componentInParent2.Size)
		{
			float magnitude = (componentInParent.transform.position - componentInParent2.transform.position).magnitude;
			float num = componentInParent.Size / 2f - componentInParent2.Size / 2f;
			if (magnitude <= num)
			{
				BaseGameManager.Instance.ProcessKill(componentInParent.PlayerId, componentInParent2.PlayerId);
			}
		}
	}
}
